<template>
    <div class="">
        <ezm-layout>
            <van-nav-bar
                slot="nav"
                title="返回执行指定钩子"
                left-arrow
                @click-left="g_navigate.back()"
            ></van-nav-bar>

            <div class="pa-md">
                <div class=""># 修改下列输入框参数后点击返回</div>
                <van-form @submit="onSubmit">
                    <van-field
                        v-model="p1"
                        name="参数1"
                        label="参数1"
                        placeholder="输入参数1"
                    ></van-field>
                    <van-field
                        v-model="p2"
                        name="参数2"
                        label="参数2"
                        placeholder="输入参数2"
                    ></van-field>
                    <van-button block type="info" native-type="submit">
                        点击返回并执行 hookBack 钩子函数
                    </van-button>
                </van-form>
            </div>
        </ezm-layout>
    </div>
</template>

<script>

    import EzmLayout from "@/components/layout/ezm-layout";

    export default {
        name: 'RouteDemoHookBack',
        mixins: [],
        components: {EzmLayout},
        props: {},
        data() {
            return {
                p1: '参数1',
                p2: '参数2',
            }
        },
        computed: {},
        watch: {},
        created() {
        },
        mounted() {
        },
        destroyed() {
        },
        methods: {
            onSubmit() {
                this.$navigate.backInvoke('hookBack', this.p1, this.p2);
            }
        }
    };
</script>

<style lang="less">

</style>